package com.yh.modules.data.vo;

import cn.hutool.core.util.RandomUtil;
import cn.hutool.json.JSONUtil;
import com.alibaba.druid.support.json.JSONUtils;
import lombok.Data;

import java.math.RoundingMode;

/**
 * created by skh on 2018/9/25
 */
@Data
public class Machine1 {

	private Double gap;
	private Double offset;
	private Double thickness;
	private Integer topContact;
	private Integer midContact;
	private Integer bottomContact;

	public static void main(String[] args) {

		Machine1 machine1 = new Machine1();
		machine1.setGap(RandomUtil.randomDouble(5, RoundingMode.HALF_UP));
		machine1.setOffset(RandomUtil.randomDouble(5, RoundingMode.HALF_UP));
		machine1.setThickness(RandomUtil.randomDouble(5, RoundingMode.HALF_UP));
		machine1.setTopContact(1);
		machine1.setMidContact(1);
		machine1.setBottomContact(1);
		String s = JSONUtil.toJsonStr(machine1);
		System.out.println("s = " + s);

	}
}
